package com.kgc.activityprovider.service.impl;

import com.kgc.activiti.pojo.WorkFlowType;
import com.kgc.activiti.util.ResponseMsg;
import com.kgc.activityprovider.dao.WorkFlowTypeMapper;
import com.kgc.activityprovider.service.WorkFlowTypeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WorkFlowTypeServiceImpl implements WorkFlowTypeService {

    @Autowired
    private WorkFlowTypeMapper workFlowTypeMapper;

    private Logger logger  = LoggerFactory.getLogger(getClass());

    @Override
    public ResponseMsg selectAllWorkFlowType() {
        ResponseMsg msg = new ResponseMsg();
        logger.info("WorkFlowTypeServiceImpl selectAllWorkFlowType is start...");
        List<WorkFlowType> workFlowTypes = workFlowTypeMapper.selectAllWorkFlowType();
        msg.setCode("200");
        msg.setData(workFlowTypes);
        logger.debug("WorkFlowTypeServiceImpl selectAllWorkFlowType msg:"+msg);
        return msg;
    }
}
